#ifndef CBITMAPCLASS_H
#define CBITMAPCLASS_H

#include "TextureClass.h"

class CBitmapClass
{
	struct VertexType
	{
		D3DXVECTOR3 d3dPosition;
		D3DXVECTOR2 d3dTexture;
	};

	CTextureClass* m_pTexture;
	ID3D11Buffer* m_pVertexBuffer;
	ID3D11Buffer* m_pIndexBuffer;
	int m_nVertexCount;
	int n_nIndexCount;
	int m_nScreenWidth;
	int m_nScreenHeight;
	int m_nBitmapWidth;
	int m_nBitmapHeight;
	int m_nPreviousXPos;
	int m_nPreviousYPos;
	
	bool InitializeBuffers(ID3D11Device* pDevice);
	void ShutDownBuffers();
	bool UpdateBuffers(ID3D11DeviceContext* pDeviceContext, int nXPos, int nYPos);
	void RenderBuffers(ID3D11DeviceContext* pDeviceContext);
	bool LoadTexture(ID3D11Device* pDevice, WCHAR* pwszFileName);
	void ReleaseTexture();

public:
	CBitmapClass(void);
	CBitmapClass(const CBitmapClass&);
	~CBitmapClass(void);

	bool Initialize(ID3D11Device* pDevice, int nScreenWidth, int nScreenHeight, WCHAR* pwszFileName, int nBitmapWidth, int nBitmapHeight);
	void ShutDown();
	bool Render(ID3D11DeviceContext* pDeviceContext, int nXPos, int nYPos);

	int GetIndexCount();
	ID3D11ShaderResourceView* GetTexture();
};

#endif